package com.wisnews.controller.sec;


import com.baomidou.mybatisplus.core.metadata.IPage;
import com.wisnews.pojo.Input;
import com.wisnews.pojo.Result;
import com.wisnews.service.sys.IVisitLogService;
import com.wisnews.util.Constants;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RestController;

/**
 * <p>
 *  前端控制器
 * </p>
 *
 * @author yuyd
 * @since 2021-02-08
 */
@RestController
@RequestMapping("/visit-log")
public class VisitLogController {

    @Autowired
    private IVisitLogService visitLogService;

    @RequestMapping(value = "log-list",method = RequestMethod.POST)
    public Result list(@RequestBody Input input){

        IPage page = visitLogService.qureyList(input.toPage());

        return new Result(Constants.SYS_CODE.SUCCESS, Constants.SYS_CODE.SUCCESS_MESSAGE,page);
    }

}
